/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package battle.ship.uinterface;

import battle.ship.model.Point;
import battle.ship.model.SquareType;
import javax.swing.JButton;

/**
 *
 * @author Carlos
 */
public class BattleShipJButton extends JButton{
    private final Point point;
    private final SquareType squareType;
    
    private boolean alreadyVisited = false;

    public boolean isAlreadyVisited() {
            return alreadyVisited;
    }
    public void setAlreadyVisited() {
            this.alreadyVisited = true;
    }
    public void unsetAlreadyVisited() {
            this.alreadyVisited = false;
    }
    
    public BattleShipJButton( int x, int y){
        this.point = new Point(x,y);
        this.squareType = SquareType.WATTER;
    }
    
    public SquareType getSquareType(){
        return this.squareType;
    }
    
    public Point getPoint(){
        return this.point;
    }
    
}
